package cn.torna.example.web.controller;

import cn.torna.example.common.Result;
import cn.torna.example.web.controller.param.CategoryParam;
import cn.torna.example.web.controller.vo.CategoryVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 分类模块
 *
 * @author tanghc
 */
@RestController
@RequestMapping("category")
public class CategoryController {

    /**
     * 添加分类
     * @param param
     * @return
     */
    @PostMapping("add")
    public Result<Integer> add(@RequestBody CategoryParam param) {
        return Result.ok(1);
    }

    /**
     * 查询分类
     *
     * @return
     */
    @PostMapping("get")
    public Result<CategoryVO> get(Integer id) {
        return Result.ok(new CategoryVO());
    }


}
